home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / print / vspool.zip / SPOOL.DOC < prev    next >
Text File  |  1989-03-20  |  30KB  |  859 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                   Table of Contents
  8.  
  9.  
  10.            1. Overview...................................................2
  11.  
  12.            2. Installation...............................................2
  13.  
  14.            3. Accessing Versa-Spool Once Installed.......................3
  15.  
  16.            4. The Parameters Enumerated..................................4
  17.  
  18.            5. Examples...................................................7
  19.               5.1. To Install............................................8
  20.               5.2. After Installation....................................8
  21.  
  22.            6. Programmer's Corner........................................9
  23.               6.1. Sub-Function 0 : Return Signature.....................9
  24.               6.2. Sub-Function 1 : Toggle Pause.........................9
  25.               6.3. Sub-Function 2 : Clear Buffer.........................9
  26.               6.4. Sub-Function 3 : Request Pause Condition..............9
  27.               6.5. Sub-Function 4 : Request Free Buffer Space............9
  28.               6.6. Sub-Function 5 : Request Total Buffer Size............9
  29.               6.7. Sub-Function 6 : Redirect Output To LPT1:.............9
  30.               6.8. Sub-Function 7 : Redirect Output To LPT2:.............9
  31.               6.9. Sub-Function 8 : Redirect Output To LPT3:.............9
  32.               6.10. Sub-Function 9 : Request Output Device..............10
  33.               6.11. Sub-Function A : Request Output Speed...............10
  34.               6.12. Sub-Function B : Request Device Spooled Status......10
  35.               6.13. Turbo Basic Function Call Examples..................10
  36.  
  37.            7. Business Stuff............................................10
  38.  
  39.            8. User Registration Form....................................12
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                                           i
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.                                      Versa-Spool
  90.  
  91.                                     Version 1.01
  92.  
  93.                                A multi-printer spooler
  94.                             Copyright 1989 - Jeff Newbro
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                                           1
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.           1. Overview
  140.  
  141.           Versa-Spool is an extremely versatile print spooler  written  for
  142.           the  IBM-PC/AT  series of computers.   In an effort to anticipate
  143.           all the circumstances under which Versa-Spool may be required  to
  144.           operate,  features  such as multiple buffers,  large buffer size,
  145.           adjustable output speed,  and the ability to redirect  a  printer
  146.           stream  from  one  printer  to another have been implemented.   A
  147.           protocol has been developed  which  will  permit  access  to  the
  148.           operating  parameters  and  current  status of Versa-Spool either
  149.           from the dos prompt,  or from within a program in order to enable
  150.           applications   to   interact  intelligently  with  their  printer
  151.           resources.
  152.  
  153.           Versa-Spool is installed and accessed at the dos prompt with  the
  154.           following syntax :
  155.  
  156.                SPOOL [-option(s)] <enter>
  157.  
  158.             where option is one or more of the following :
  159.               -b{n}      = Buffer size (n=1..Available memory in k)
  160.               -c         = Clear print buffer
  161.               -n{n}      = printer Number (n=1..3)
  162.               -p         = toggle Pause
  163.               -r{n}      = Redirect output to new device (n=1..3)
  164.               -s{n}      = output Speed in cps (default = 100)
  165.               -u{n}      = allocate buffers in Unused memory (n=0..FFFF)
  166.               -v{n}      = offset interrupt Vectors (n=1..6)
  167.               -?         = Show status
  168.  
  169.  
  170.           2. Installation
  171.  
  172.           Versa-Spool  is  a  memory resident program which installs itself
  173.           according to parameters specified by the -b, -n, -s,  -u,  and -v
  174.           options the first time it is executed.   If no value is specified
  175.           for these options,  Versa-Spool will  assume  that  1  buffer,  1
  176.           kilobyte,   and  100  characters  per  second,  are  the  desired
  177.           parameters.
  178.  
  179.           For example,  to install Versa-Spool to provide LPT1:  and  LPT2:
  180.           with  80k  buffers  each,  the  following  command  line would be
  181.           entered :
  182.  
  183.           C:\> spool -n2 -b80 <Enter>
  184.  
  185.           or, for a single 200k buffer for LPT1:, type :
  186.  
  187.           C:\> spool -n1 -b200 <Enter>
  188.  
  189.           It would not be possible to install a single  buffer  for  LPT2:,
  190.           since  the  buffers  are  allocated sequentially,  beginning with
  191.  
  192.                                           2
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.           LPT1:.  It would, however, be possible to install a single buffer
  206.           for LPT1: whose output was redirected to LPT2:.   This  would  be
  207.           accomplished by the following two commands :
  208.  
  209.           C:\> spool -n1 -b100 <Enter>
  210.           C:\> spool -n1 -r2 <Enter>
  211.  
  212.           The  redirection  feature  will  be  discussed  in greater detail
  213.           later.
  214.  
  215.           Once Versa-Spool has installed itself as  a  terminate  and  stay
  216.           resident program (TSR for short),  it will print its installation
  217.           status on the screen and return to dos.   For those who may  want
  218.           to install Versa-Spool with a batch files that checks the success
  219.           of  its  commands,  an  error  level of 0 will be returned if the
  220.           installation was successful,  or 1 if there was an error.   Also,
  221.           for  the  batch  file  programmers,  the  messages printed on the
  222.           screen by Versa-Spool may be piped to the nul  device  if  it  is
  223.           undesirable  for the end user to see them.   For instance a batch
  224.           file containing the lines :
  225.  
  226.           .
  227.           .
  228.           spool -n1 -b100 > nul
  229.           IF ERRORLEVEL 1 GOTO NOGOOD
  230.           .
  231.           .
  232.  
  233.           would install a 100k buffer for LPT1: and show no  message  after
  234.           installation.    If  Versa-Spool did not install itself properly,
  235.           execution would be vectored to the label "NOGOOD",  presumably to
  236.           echo an error message and exit.
  237.  
  238.           Subsequent executions of Versa-Spool will not install another TSR
  239.           copy  of Versa-Spool,  but will rather provide communication with
  240.           the already  installed  TSR  program.    The  protocol  for  this
  241.           communication is described in the "Programmer's Corner" section.
  242.  
  243.  
  244.           3. Accessing Versa-Spool Once Installed
  245.  
  246.           After  the first time Versa-Spool is run,  and its TSR portion is
  247.           loaded, subsequent executions of the program will either cause it
  248.           to print the current status of the resident copy in  response  to
  249.           the  -?  option,  or  attempt  to  modify  its  operating  status
  250.           according to the -c, -p, or -r parameters.
  251.  
  252.           For example, if LPT2: is to be paused for some reason, the line :
  253.  
  254.           C:\> spool -n2 -p <Enter>
  255.  
  256.           would be entered.   Note that in this instance,  the -n parameter
  257.  
  258.                                           3
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.           specifies  the device to be addressed,  rather than the number of
  272.           buffers  to  be  installed.    This  convention  applies  to  all
  273.           executions  of  Versa-Spool  subsequent  to  the  first,  when it
  274.           installs its TSR portion.   The pause option is a toggle,  so  to
  275.           restart the printer, the same line would be re-entered.
  276.  
  277.           Similarly, to clear the buffer for LPT1:, the line :
  278.  
  279.           C:\> spool -n1 -c <Enter>
  280.  
  281.           will  effect  the  desired  result.   Or,  since -n1 is a default
  282.           value, simply :
  283.  
  284.           C:\> spool -c <Enter>
  285.  
  286.           would suffice.
  287.  
  288.  
  289.           4. The Parameters Enumerated
  290.  
  291.           Now that you have the general idea,  here is some  more  specific
  292.           information about the available p